//
//  GS_EffTableViewCell.m
//  GoodManNews
//
//  Created by dllo on 16/1/19.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "GS_EffTableViewCell.h"

@implementation GS_EffTableViewCell

- (void)dealloc
{
    [_titleL release];
    [_firstImageV release];
    [_secondImageV release];
    [_thirdImageV release];
    [_fourthImageV release];
    [_fifthImageV release];
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubviews];
    }
    return self;
}

- (void)layoutSubviews

{
    [super layoutSubviews];
    [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.left.equalTo(self.contentView.mas_left).with.offset(10);
        make.top.equalTo(self.contentView.mas_top).with.offset(10);
        make.width.equalTo(@120);
        make.height.equalTo(@30);
        
    }];
    
    [self.firstImageV mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.equalTo(self.contentView.mas_left).with.offset(10);
        make.top.equalTo(self.titleL.mas_bottom).with.offset(10);
        make.width.equalTo(@60);
        make.height.equalTo(@60);
        
    }];
    
    [self.secondImageV mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.equalTo(self.firstImageV.mas_right).with.offset(10);
        make.top.equalTo(self.titleL.mas_bottom).with.offset(10);
        make.width.equalTo(@60);
        make.height.equalTo(@60);
        
    }];
    
    [self.thirdImageV mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.equalTo(self.secondImageV.mas_right).with.offset(10);
        make.top.equalTo(self.titleL.mas_bottom).with.offset(10);
        make.width.equalTo(@60);
        make.height.equalTo(@60);
        
    }];
    
    [self.fourthImageV mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.equalTo(self.thirdImageV.mas_right).with.offset(10);
        make.top.equalTo(self.titleL.mas_bottom).with.offset(10);
        make.width.equalTo(@60);
        make.height.equalTo(@60);
        
    }];
    
    [self.fifthImageV mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.equalTo(self.fourthImageV.mas_right).with.offset(10);
        make.top.equalTo(self.titleL.mas_bottom).with.offset(10);
        make.width.equalTo(@60);
        make.height.equalTo(@60);
        
    }];

}

- (void)createSubviews
{
    self.titleL = [UILabel new];
//    self.titleL.backgroundColor = [UIColor purpleColor];
    self.titleL.font = [UIFont systemFontOfSize:15];
    [self.contentView addSubview:self.titleL];
    
    self.firstImageV = [UIImageView new];
    self.firstImageV.backgroundColor = [UIColor purpleColor];
    [self.contentView addSubview:self.firstImageV];
    
    self.secondImageV = [UIImageView new];
    self.secondImageV.backgroundColor = [UIColor purpleColor];
    [self.contentView addSubview:self.secondImageV];
    
    self.thirdImageV = [UIImageView new];
    self.thirdImageV.backgroundColor = [UIColor purpleColor];
    [self.contentView addSubview:self.thirdImageV];
    
    self.fourthImageV = [UIImageView new];
    self.fourthImageV.backgroundColor = [UIColor purpleColor];
    [self.contentView addSubview:self.fourthImageV];
    
    self.fifthImageV = [UIImageView new];
    self.fifthImageV.backgroundColor = [UIColor purpleColor];
    [self.contentView addSubview:self.fifthImageV];
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
